package com.example.park2212.car

import androidx.lifecycle.MutableLiveData
import com.example.lib_base.entity.CarBean
import com.example.lib_base.entity.CarBeanItem
import com.example.lib_base.mvvm.BaseViewModel
import com.example.lib_base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class CarViewModel @Inject constructor(val apiService: ApiService) :BaseViewModel() {

    val carSuccess = MutableLiveData<CarBeanItem>()
    fun car(areaId:Int){
        httpRequest({
            apiService.car(areaId)
        },{carSuccess.value = it })
    }

}